﻿@model TumbaloSoft.Models.PersonaNatural     
@{
   
    Layout = "~/Views/Shared/_VendedorLayout.cshtml";  
    ViewBag.Title = "Registro Cliente Natural";
}

<script>
    $(function () {
        $("#datepicker").datepicker({
            changeMonth: true,
            changeYear: true, dateFormat: 'dd/mm/yy'
        });
    });
 </script>

    <script type="text/javascript">
        $(function () {

            $('#txtDate').datepicker({
                buttonImage: '../Content/site/images/calendar.png',
                buttonImageOnly: true,
                showOn: 'button'
            });
        });

    </script>


<script>
    // increase the default animation speed to exaggerate the effect
    //$.fx.speeds._default = 4000;
    $(function () {
        $("#dialog").dialog({
            autoOpen: false,
            resizable: false,
            height: 240,
            modal: true,
            buttons: {
                "Si": function () {
                    $("#form_1").submit();
                    $(this).dialog('close');
                },

                "No": function () {
                    $(this).dialog("close");
                }
            }
        });

        $("#open").click(function () {
            $("#dialog").dialog("open");
            return false;
        });
    });
</script>

    <!-- content -->
    <div class="body2">
        <div class="main">
            <section id="content">
                <div class="wrapper">
                   <article class="col0" >
                       <nav class="urbangreymenu">
                                <h3 class="headerbar">Mantenimiento Cliente</h3>
                                    <ul id="subMenu">
                                        <li><h5>@Html.ActionLink("Nuevo Cliente Natural","RegistrarPersonaNatural")</h5></li>
                                         <li><h5>@Html.ActionLink("Ver Lista Clientes Naturales", "IndexClienteNatural")</h5></li>
                                        
                                    </ul>
                            </nav>
                       </article>

                      <article class="col5">
                        <div>&nbsp</div>
                        </article>

                    <!--FORMULARIO-->
                      <article class="col1">
                         <form id="form_1" method ="post" style="height:100% ; width: 563px">
                            <div class="pad1" style="padding-bottom: 29px; width:442px">
                                <h2 class="pad_bot1 pad_top1">Registrar Cliente Natural</h2>
                                <h3 class="pad_bot1 pad_top1">Datos del Cliente: </h3>
                                
                        
                               <!--NOMBRE-->
                               <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Nombre*:</span></td>
                                                        <td style="width: 210px">
                                                            @Html.TextBoxFor(model => model.prNombre, new { @class="input", maxlength = "30",placeholder = "Maximo 30 caracteres aqui"})
                                                            @Html.ValidationMessageFor(model => model.prNombre,null)
                                                        </td>
                                                    </tr>
                                                </table>
                                </div>
                             
                                  <!--APELLIDOPATERNO-->
                                            <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Apellido Paterno*:</span></td>
                                                        <td style="width: 210px">    
                                                            @Html.TextBoxFor(model => model.prApellidoPaterno, new { @class="input",maxlength = "30", placeholder = "Maximo 30 caracteres aqui"})
                                                            @Html.ValidationMessageFor(model=> model.prApellidoPaterno,null)
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>

                                            <!--APELLIDOMATERNO-->
                                            <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Apellido Materno:</span></td>
                                                        <td style="width: 210px">                                                                                                          
                                                                @Html.TextBoxFor(model => model.prApellidoMaterno, new { @class="input",maxlength = "30", placeholder = "Maximo 30 caracteres aqui"})
                                                                @Html.ValidationMessageFor(model=> model.prApellidoMaterno)                                                            
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>

                                <!--Tipo de Document: Carnet de extranjeria, Dni-->
                                <div class="row_select"">
                                                <table style="width:420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Tipo Documento:</span></td>
                                                        <td style="width: 210px">   
                                                            <select name="prTipoDocumento.prIdTipoDocumento">                                                         
                                                                @foreach (var objTipo in ViewBag.listaTipo)
                                                                {
                                                                    
                                                                    
                                                                    <option value="@objTipo.prIdTipoDocumento">@objTipo.prDescripcion</option>
                                                                }
                                                            </select>
                                                        </td>                                              
                                                    </tr>
                                                </table>
                                            </div>  
                                     <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Numero de Documento*:</span></td>
                                                        <td style="width: 210px">    
                                                               
                                                                                                                                                                
                                                                @Html.TextBoxFor(model => model.prCodigoDocumento, new { @Class="input",maxlength = "8", minlength = "8"})
                                                                @Html.ValidationMessageFor(model=> model.prCodigoDocumento,null)       
                                                               
                                                                                                                                                                                        
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>

                                  <!--RUC-->
                                            <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>RUC:</span></td>
                                                        <td style="width: 210px">                                                                                                          
                                                                @Html.TextBoxFor(model => model.prRuc, new { @Class="input",maxlength = "11", minlength = "8"})
                                                                @Html.ValidationMessageFor(model=> model.prRuc)                                                          
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>


                                    <!--SEXOOOOOOOOOO-->
                                            <div class="row_select">
                                                <table style="width:420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Sexo:</span></td>
                                                        <td style="width: 210px">   
                                                            <select name="prSexo">                                 
                                                                    <option value="M">Masculino</option>
                                                                    <option value="F">Femenino</option>
                                                            </select>
                                                        </td>                                              
                                                    </tr>
                                                </table>                                                    
                                            </div>

                                   <!--FECHADENACIMIENTO-->
                                            <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Fecha de Nacimiento*:</span></td>
                                                        <td style="width: 210px"> 
                                                            <input class="input" id="datepicker" name="prFechaNacimiento"/> 
                                                            
                                                            @Html.ValidationMessageFor(model=>model.prFechaNacimiento,null)  
                                                                                                                    
                                                        </td>
                                                    </tr>
                                                </table>                                                
                                            </div>

                            


                                   <!--DIRECCION-->
                                            <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Direccion*:</span></td>
                                                        <td style="width: 210px"> 
                                                            @Html.TextBoxFor(model => model.prDireccion, new { @Class="input",maxlength = "50", placeholder = "Maximo 50 caracteres aqui"})
                                                            @Html.ValidationMessageFor(model=> model.prDireccion,null)
                                                        </td>
                                                    </tr>
                                                </table>  
                                            </div>
                                                          
                                      <!--E-MAIL-->
                                            <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Email:</span></td>
                                                        <td style="width: 210px"> 
                                                            @Html.TextBoxFor(model => model.prEmail, new { @Class="input",placeholder="ejemplo@dominio.com"})
                                                            @Html.ValidationMessageFor(model=> model.prEmail)
                                                        </td>
                                                    </tr>
                                                </table>            
                                            </div> 
                                   <!--TELEFONO-->
                                            <div class="row">
                                                <table style="width: 420px">
                                                    <tr>
                                                        <td style="width: 210px"><span>Telefono:</span></td>
                                                        <td style="width: 210px"> 
                                                            @Html.TextBoxFor(model => model.prTelefono, new { @Class="input",maxlength = "9", minlength = "9"})
                                                            @Html.ValidationMessageFor(model=> model.prTelefono)
                                                        </td>
                                                    </tr>
                                                </table> 
                                            </div>
                                         
                                                             
                                 <table style="width: 500px">
                                    <tr>
                                        <td style="width: 167px">
									<div id="dialog" title="Nuevo Cliente">
                                                    <p>Esta seguro que desea guardar los datos del cliente?</p>                                                    
                                                    <!--<a href="#" id="opener"  class="button" onClick="document.getElementById('form_1').submit()">Guardar</a>-->
                                                </div>

                                                <button id="open"  class="button">Registrar</button>

                                        </td>
                                        <td style="width: 166px"><a href="#" class="button" onclick="document.getElementById('form_1').reset()">Limpiar</a></td>
                                        <td style="width: 167px"><a href="javascript:history.go(-1)" class="button" onclick="document.getElementById('form_1').cancel()">Cancelar</a></td>
                                    </tr>
                                </table>
                              
                            </form>
                   


                    </article>
                </div>

            </section>
        </div>
    </div>

    <!-- / content -->

    <script type="text/javascript"> Cufon.now(); </script>
